//
// Decompiled by Jadx - 344ms
//
package fh;

import android.app.Activity;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import androidx.recyclerview.widget.RecyclerView;
import fm.g;
import gc.z;
import java.util.List;
import r.h;

public final class b extends RecyclerView.Adapter<b$a> {
    public List<g> a;
    public final Activity b;

    public b(Activity activity, List<g> list) {
        this.b = activity;
        this.a = list;
    }

    public int getItemCount() {
        List<g> list = this.a;
        if (list != null) {
            return list.size();
        }
        return 0;
    }

    public long getItemId(int i) {
        return 0L;
    }

    public void onBindViewHolder(b$a aeVar, int i) {
        StringBuilder sb;
        String str;
        b$a aVar = aeVar;
        g gVar = this.a.get(i);
        aVar.getClass();
        aVar.a.setText(gVar.e);
        aVar.b.setText(String.valueOf(gVar.h));
        long j = gVar.g;
        long j2 = gVar.f;
        if (j > j2) {
            long j3 = j - j2;
            if (j3 >= 1000) {
                sb = new StringBuilder();
                sb.append(h.i(gVar.f));
                sb.append(" 访问了你主页 ");
                sb.append(j3 / 1000);
                str = " 秒";
            } else {
                sb = new StringBuilder();
                sb.append(h.i(gVar.f));
                str = " 访问了你主页不到一秒";
            }
        } else {
            sb = new StringBuilder();
            sb.append(h.i(gVar.f));
            str = " 访问了你主页";
        }
        sb.append(str);
        aVar.c.setText(sb.toString());
        z.dh(aVar.f.b, androidx.activity.b.j(new StringBuilder("https://china-img.soulapp.cn/heads/"), gVar.i, ".png"), aVar.e, 40);
        aVar.d.setOnClickListener(new a(0, gVar));
    }

    public b$a onCreateViewHolder(ViewGroup viewGroup, int i) {
        return new a(this, LayoutInflater.from(viewGroup.getContext()).inflate(-2113142642, viewGroup, false));
    }
}
